<script lang="ts" setup>
const titleSetup = ref('Hello')
const test = useTest()
console.log(test.count)
test.increment()
console.log(test.getCount)
</script>

<template>
	<view class="flex flex-col items-center justify-center">
		<u-button @click="toTestVuex">TestVuex</u-button>
		<image
			class="h-200rpx w-200rpx mt-200rpx mx-auto mb-50rpx"
			src="/static/favicon.ico"></image>
		<view class="text-area">
			<text class="title text-red">{{ title }}</text>
			<text class="title text-red">{{ titleSetup }}</text>
			<text class="text-blue">{{ $enums.common.isDatas.Y[0] }}</text>
			<text class="text-green">{{ $enums.common.isDatas.Y[1] }}</text>
		</view>
		<uni-badge
			class="uni-badge-left-margin"
			:is-dot="false"
			:text="13"
			absolute="rightTop"
			size="small">
			<view class="box"><text class="box-text">圆点</text></view>
		</uni-badge>
		<uni-card>123</uni-card>
	</view>
</template>

<script lang="ts">
export default {
	data() {
		return {
			title: 'Demo'
		}
	},
	onLoad() {
		console.log(this.$env.apiDomain)
		console.log(this.$api.xcxApiUrl)
		// this.$api.guestPost('/guest/pub/test').then((res) => {
		// 	console.log(res)
		// })
	},
	methods: {
		toTestVuex() {
			// this.$router.push('/pages/demo/TestVuex')
			uni.navigateTo({ url: '/pages/demo/TestVuex' })
		}
	}
}
</script>
